<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('aq_models', function (Blueprint $table) {
            $table->comment('问答模型');
            $table->increments('id');
            $table->string('name')->default('')->comment('模型名称');
            $table->tinyInteger('enabled')->default(new \Illuminate\Database\Query\Expression('1'))->comment('是否启用');
            $table->tinyInteger('image_enabled')->default(new \Illuminate\Database\Query\Expression('0'))->comment('图片是否启用');
            $table->string('image_model')->default('')->comment('图片模型');
            $table->string('image_prompt')->default('')->comment('图片解析提示词');
            $table->string('app_id')->default('')->comment('应用ID');
            $table->string('api_key')->default('')->comment('API-KEY');
            $table->integer('ext_num')->default(new \Illuminate\Database\Query\Expression('0'))->comment('消耗积分');
            $table->string('loading_text')->default('')->comment('思考提示');
            $table->text('prompt')->comment('组合提示词');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('aq_models');
    }
};
